package com.lnking.lnkingplace.model.dto.activity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.lnking.lnkingplace.model.entity.FileList;
import com.lnking.lnkingplace.model.enums.ActivityStatus;
import com.lnking.starter.mybatis.entity.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author 联坤
 */
@Data
public class ActivityDto extends BaseEntity {

    @ApiModelProperty(value = "场所id")
    private String placeId;

    @ApiModelProperty(value = "场所NAME")
    private String placeName;

    @ApiModelProperty(value = "活动名称")
    private String name;

    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "开始时间")
    private LocalDateTime startTime;

    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "结束时间")
    private LocalDateTime endTime;

    @ApiModelProperty(value = "联系电话")
    private String phone;

    @ApiModelProperty(value = "活动地址")
    private String address;

    @ApiModelProperty(value = "封面图片")
    private String photos;

    @ApiModelProperty(value = "活动内容")
    private String content;

    @ApiModelProperty(value = "活动状态")
    private String status;

    public String getStatus() {
        return ActivityStatus.StatusByTime(startTime,endTime);
    }
}
